package com.homework.test3;

import java.util.Scanner;

public class Demo6 {

    public static String M1(int x,int y,int z){
        int t = 0;
        if (x<y){
            t = x;
            x = y;
            y = t;
        }
        if (y<z){
            t = y;
            y = z;
            z = t;
        }
        String str = "从大到小的顺序是："+x+" "+y+" "+z+" ";
        return str;
    }

    public static void main(String[] args) {

        int[] arr = new int[3];
        for (int i = 0; i < arr.length; i++) {
            System.out.println("请输入第一个数");
            arr[i] = new Scanner(System.in).nextInt();
        }
        String str = M1(arr[0], arr[1], arr[2]);
        System.out.println(str);
    }
}
